/*
 * MainFrame.java
 *
 * Created on 14 de Outubro de 2009, 13:16
 */

package agendaBD;

import javax.swing.JPanel;

/**
 *
 * @author  07205156
 */
public class MainFrame extends javax.swing.JFrame {
    
    private PainelContatos pnlContatos;
    private PainelCompromissos pnlCompromissos;
    private PainelLocal pnlLocais;
    private PainelDisciplinas pnlDisciplinas;
    private PainelAula pnlAulas;
    
    /** Creates new form MainFrame */
    public MainFrame() {
        initComponents();
        this.pnlContent.add(new PainelInicial());
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jToolBar1 = new javax.swing.JToolBar();
        btnContato = new javax.swing.JButton();
        btnCompromisso = new javax.swing.JButton();
        btnAula = new javax.swing.JButton();
        btnLocal = new javax.swing.JButton();
        btnDisciplina = new javax.swing.JButton();
        pnlContent = new javax.swing.JPanel();
        jMenuBar2 = new javax.swing.JMenuBar();
        jMenu4 = new javax.swing.JMenu();
        menuContato = new javax.swing.JMenuItem();
        menuCompromisso = new javax.swing.JMenuItem();
        menuAulas = new javax.swing.JMenuItem();
        menuLocal = new javax.swing.JMenuItem();
        menuDisciplina = new javax.swing.JMenuItem();
        jMenu5 = new javax.swing.JMenu();
        jMenuItem9 = new javax.swing.JMenuItem();
        jMenuItem10 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("AgendaBD");
        setMinimumSize(new java.awt.Dimension(300, 150));

        jToolBar1.setRollover(true);

        btnContato.setIcon(new javax.swing.ImageIcon(getClass().getResource("/agendaBD/imagens/contato1.png"))); // NOI18N
        btnContato.setToolTipText("Contatos");
        btnContato.setFocusable(false);
        btnContato.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnContato.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnContato.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnContatoActionPerformed(evt);
            }
        });
        jToolBar1.add(btnContato);

        btnCompromisso.setIcon(new javax.swing.ImageIcon(getClass().getResource("/agendaBD/imagens/Compromisso.png"))); // NOI18N
        btnCompromisso.setToolTipText("Compromissos");
        btnCompromisso.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCompromissoActionPerformed(evt);
            }
        });
        jToolBar1.add(btnCompromisso);

        btnAula.setIcon(new javax.swing.ImageIcon(getClass().getResource("/agendaBD/imagens/super-mario-world-x-icon.png"))); // NOI18N
        btnAula.setToolTipText("Aulas");
        btnAula.setFocusable(false);
        btnAula.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnAula.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnAula.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnAulaActionPerformed(evt);
            }
        });
        jToolBar1.add(btnAula);

        btnLocal.setIcon(new javax.swing.ImageIcon(getClass().getResource("/agendaBD/imagens/Local.png"))); // NOI18N
        btnLocal.setToolTipText("Locais");
        btnLocal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLocalActionPerformed(evt);
            }
        });
        jToolBar1.add(btnLocal);

        btnDisciplina.setIcon(new javax.swing.ImageIcon(getClass().getResource("/agendaBD/imagens/Question Coin.png"))); // NOI18N
        btnDisciplina.setToolTipText("Disiciplinas");
        btnDisciplina.setFocusable(false);
        btnDisciplina.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        btnDisciplina.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        btnDisciplina.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnDisciplinaActionPerformed(evt);
            }
        });
        jToolBar1.add(btnDisciplina);

        getContentPane().add(jToolBar1, java.awt.BorderLayout.NORTH);

        pnlContent.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        pnlContent.setMinimumSize(new java.awt.Dimension(300, 200));
        pnlContent.setPreferredSize(new java.awt.Dimension(600, 800));
        pnlContent.setLayout(new java.awt.BorderLayout());
        getContentPane().add(pnlContent, java.awt.BorderLayout.CENTER);

        jMenu4.setText("Agenda");
        jMenu4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenu4ActionPerformed(evt);
            }
        });

        menuContato.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK));
        menuContato.setText("Contato");
        menuContato.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuContatoActionPerformed(evt);
            }
        });
        jMenu4.add(menuContato);

        menuCompromisso.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.ALT_MASK));
        menuCompromisso.setText("Compromisso");
        menuCompromisso.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuCompromissoActionPerformed(evt);
            }
        });
        jMenu4.add(menuCompromisso);

        menuAulas.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.ALT_MASK));
        menuAulas.setText("Aulas");
        menuAulas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuAulasActionPerformed(evt);
            }
        });
        jMenu4.add(menuAulas);

        menuLocal.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_L, java.awt.event.InputEvent.ALT_MASK));
        menuLocal.setText("Local");
        menuLocal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuLocalActionPerformed(evt);
            }
        });
        jMenu4.add(menuLocal);

        menuDisciplina.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.ALT_MASK));
        menuDisciplina.setText("Disciplinas");
        menuDisciplina.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuDisciplinaActionPerformed(evt);
            }
        });
        jMenu4.add(menuDisciplina);

        jMenuBar2.add(jMenu4);

        jMenu5.setText("Ajuda");

        jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
        jMenuItem9.setText("Centro de Ajuda e Suporte");
        jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem9ActionPerformed(evt);
            }
        });
        jMenu5.add(jMenuItem9);

        jMenuItem10.setText("Sobre...");
        jMenuItem10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItem10ActionPerformed(evt);
            }
        });
        jMenu5.add(jMenuItem10);

        jMenuBar2.add(jMenu5);

        setJMenuBar(jMenuBar2);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnContatoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnContatoActionPerformed
        this.pnlContatos = new PainelContatos();
        this.pnlContent.removeAll();
        this.pnlContent.add(this.pnlContatos);
        this.pnlContent.updateUI();
    }//GEN-LAST:event_btnContatoActionPerformed

    private void jMenu4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenu4ActionPerformed

    }//GEN-LAST:event_jMenu4ActionPerformed

    private void btnCompromissoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCompromissoActionPerformed
        // TODO add your handling code here:
        this.pnlCompromissos = new PainelCompromissos();
        this.pnlContent.removeAll();
        this.pnlContent.add(this.pnlCompromissos);
        this.pnlContent.updateUI();
    }//GEN-LAST:event_btnCompromissoActionPerformed

    private void btnLocalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLocalActionPerformed
        // TODO add your handling code here:
        this.pnlLocais = new PainelLocal();
        this.pnlContent.removeAll();
        this.pnlContent.add(this.pnlLocais);
        this.pnlContent.updateUI();
    }//GEN-LAST:event_btnLocalActionPerformed

    private void menuContatoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuContatoActionPerformed
        // TODO add your handling code here:
        this.pnlContatos = new PainelContatos();
        this.pnlContent.removeAll();
        this.pnlContent.add(this.pnlContatos);
        this.pnlContent.updateUI();
    }//GEN-LAST:event_menuContatoActionPerformed

    private void menuCompromissoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuCompromissoActionPerformed
        // TODO add your handling code here:
        this.pnlCompromissos = new PainelCompromissos();
        this.pnlContent.removeAll();
        this.pnlContent.add(this.pnlCompromissos);
        this.pnlContent.updateUI();
    }//GEN-LAST:event_menuCompromissoActionPerformed

    private void menuLocalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuLocalActionPerformed
        // TODO add your handling code here:
        this.pnlLocais = new PainelLocal();
        this.pnlContent.removeAll();
        this.pnlContent.add(this.pnlLocais);
        this.pnlContent.updateUI();
    }//GEN-LAST:event_menuLocalActionPerformed

    private void jMenuItem10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem10ActionPerformed
        // TODO add your handling code here:

        new JanelaAjuda(this, rootPaneCheckingEnabled).setVisible(true);

    }//GEN-LAST:event_jMenuItem10ActionPerformed

    private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem9ActionPerformed
        // TODO add your handling code here:
        JanelaSuporte suporte = new JanelaSuporte(this, rootPaneCheckingEnabled);
        suporte.setSize(760, 700);
        suporte.setVisible(true);

    }//GEN-LAST:event_jMenuItem9ActionPerformed

    private void btnAulaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAulaActionPerformed
        // TODO add your handling code here:
        this.pnlAulas = new PainelAula();
        this.pnlContent.removeAll();
        this.pnlContent.add(this.pnlAulas);
        this.pnlContent.updateUI();
    }//GEN-LAST:event_btnAulaActionPerformed

    private void btnDisciplinaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnDisciplinaActionPerformed
        // TODO add your handling code here:
        this.pnlDisciplinas = new PainelDisciplinas();
        this.pnlContent.removeAll();
        this.pnlContent.add(this.pnlDisciplinas);
        this.pnlContent.updateUI();
    }//GEN-LAST:event_btnDisciplinaActionPerformed

    private void menuDisciplinaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuDisciplinaActionPerformed
        // TODO add your handling code here:
        this.pnlDisciplinas = new PainelDisciplinas();
        this.pnlContent.removeAll();
        this.pnlContent.add(this.pnlDisciplinas);
        this.pnlContent.updateUI();
    }//GEN-LAST:event_menuDisciplinaActionPerformed

    private void menuAulasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuAulasActionPerformed
        // TODO add your handling code here:
        this.pnlAulas = new PainelAula();
        this.pnlContent.removeAll();
        this.pnlContent.add(this.pnlAulas);
        this.pnlContent.updateUI();
    }//GEN-LAST:event_menuAulasActionPerformed
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainFrame().setVisible(true);
            }
        });
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnAula;
    private javax.swing.JButton btnCompromisso;
    private javax.swing.JButton btnContato;
    private javax.swing.JButton btnDisciplina;
    private javax.swing.JButton btnLocal;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenu jMenu5;
    private javax.swing.JMenuBar jMenuBar2;
    private javax.swing.JMenuItem jMenuItem10;
    private javax.swing.JMenuItem jMenuItem9;
    private javax.swing.JToolBar jToolBar1;
    private javax.swing.JMenuItem menuAulas;
    private javax.swing.JMenuItem menuCompromisso;
    private javax.swing.JMenuItem menuContato;
    private javax.swing.JMenuItem menuDisciplina;
    private javax.swing.JMenuItem menuLocal;
    private javax.swing.JPanel pnlContent;
    // End of variables declaration//GEN-END:variables
    
}
